//  银台--退款管理
import request from '@/router/axios'

//  分页查询待退款配镜单列表
export function fetchReturnMatchingPage(query) {
  return request({
    url: '/eims/sale/getRefundSalePage',
    method: 'get',
    params: query
  })
}

//  获取销售单付款记录表
export function getCashierRecordObj(obj) {
  return request({
    url: '/eims/cashierRecord/list',
    method: 'get',
    params: obj
  })
}

//  销售单退款
export function saleRefund(obj) {
  return request({
    url: '/eims/sale/updateSaleRefund',
    method: 'post',
    data: obj
  })
}

//  撤销结款
export function cancelPaySale(obj) {
  return request({
    url: '/eims/sale/cancelPaySale',
    method: 'post',
    data: obj
  })
}

//撤销退款
export function cancelSaleRefund(obj) {
  return request({
    url: '/eims/sale/cancelHisByUpdateSaleRefund',
    method: 'post',
    data: obj
  })
}

// 分页查询待退款销售订单
export function fetchWaitRefundList(query){
  return request({
    url: '/eims/sale/getInfoStatusRefundInProgress',
    method: 'get',
    params: query
  })
}

// 待退款销售订单处理
export function waitRefundMentHandle(query){
  return request({
    url: '/eims/sale/solveSaleStatusRefundInProgress',
    method: 'get',
    params: query
  })
}

// 跳过his系统直接退款
export function skipHisRefundSale(query){
  return request({
    url: '/eims/sale/skipHisRefundSale',
    method: 'get',
    params: query
  })
}
